<%--
  Created by IntelliJ IDEA.
  User: admin
  Date: 2023/4/6
  Time: 10:44
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>add page</title>
</head>
<body>
<h1>add page: student select course</h1>
<form action="/studentCourse/create" method="post">
    <select name="studentId">
        <c:forEach var="student" items="${sessionScope.students}">
            <option value="${student.id}">${student.name}</option>
        </c:forEach>
    </select>
    <select name="courseId">
        <c:forEach var="course" items="${sessionScope.courses}">
            <option value="${course.id}">${course.title}</option>
        </c:forEach>
    </select>
    <input type="submit" value="add">
</form>
</body>
</html>
